﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cataloger
{
    public partial class FrmZmienNazwe : Form
    {
        public FrmZmienNazwe()
        {
            InitializeComponent();
            this.Text = "Zmień nazwę";
        }
        public FrmZmienNazwe(Katalog kat)
            : this()
        {
            
            this.textBox1.Text = kat.Nazwa;
        }
        public FrmZmienNazwe(Nosnik nos)
            : this()
        {
            this.textBox1.Text = nos.Nazwa;
        }
        public string Nazwa
        {
            get
            {
                return textBox1.Text;
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}
